Telco Churn Prediction with Refactored Xplainable Client
This notebook demonstrates the complete ML workflow using the new refactored Xplainable client with:
- Type-safe Pydantic models
- Comprehensive error handling
- Service-oriented architecture
- All new client endpoints
- Robust production patterns
We'll predict customer churn using the IBM Telco dataset while showcasing:
- Models Service: Type-safe model creation and management
- Deployments Service: Model deployment with proper error handling
- Preprocessing Service: Pipeline management and data transformation
- Autotrain Service: AI-powered automated training workflows
- Inference Service: Predictions and explanations
- GPT Service: AI-generated insights and reports
- Datasets Service: Data management and loading
- Misc Service: Health checks and utilities
Package Installation and Imports
Initialize Refactored Xplainable Client
The new client provides:
- Service separation:
client.models,client.deployments, etc. - Type safety: Full Pydantic model validation
- Error handling: Detailed
XplainableAPIErrorexceptions - IDE support: Complete autocompletion and type hints
System Health Check
Using the Misc Service to verify system connectivity and performance.
Load Telco Churn Dataset
Using the Datasets Service to explore available datasets and load the Telco data.
AI-Powered Dataset Analysis with Autotrain
Using the Autotrain Service to get AI-powered insights about our dataset.
Data Preprocessing Pipeline
Creating and managing preprocessing pipelines with the Preprocessing Service.
Save Preprocessing Pipeline to Cloud
Using the Preprocessing Service with proper error handling.
Model Training and Optimization
Training an XClassifier with hyperparameter optimization.
Model Explainability
Generate model explanations and insights.
Save Model to Cloud
Using the Models Service with type-safe operations and error handling.
Model Deployment
Using the Deployments Service with comprehensive error handling.
Model Inference and Predictions
Using the Inference Service for predictions and explanations.
AI-Powered Insights with GPT Service
Using the GPT Service to generate intelligent reports and insights.
Collections and Organization
Using the Collections Service to organize models.